//
//  HomeHeader.m
//  便签
//
//  Created by  on 2022/9/27.
//

#import "HomeHeader.h"
@interface HomeHeader()
@property (strong, nonatomic) IBOutlet UIImageView *img;

@end
@implementation HomeHeader

- (void)awakeFromNib {
    [super awakeFromNib];
    CGRect bounds = CGRectMake(0,0,SCREEN_WIDTH,307);
    UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(12, 12)];
    CAShapeLayer *layer = [CAShapeLayer layer];
    layer.frame = bounds;
    layer.path = path.CGPath;
    self.img.layer.mask = layer;
}
- (IBAction)actionForBtn:(UIButton *)sender {
    if (self.block) {
        self.block(sender.tag == 201 ? @"便签":@"标签");
    }
}
@end
